<?php
class Customer_Service_Customer
{
	public function __construct(){
		
	}

	public static function add($row){
		$Obj = new Customer_Model_Customer();
		return $Obj->add($row);		
	}
	
	public static function update($row,$id){
		$Obj = new Customer_Model_Customer();
		return $Obj->update($row,$id);		
	}
	
	public static function delete($id){
		$Obj = new Customer_Model_Customer();
		return $Obj->delete($id);		
	}
		
	
	 
	public static function getByCustomerId($CustomerId){		
		$obj = new Customer_Model_Customer();
		if($obj->getByCustomerId($CustomerId)){
			return $obj->getByCustomerId($CustomerId)->toArray();
		}
	}
	
	public static function getByCustomerName($CustomerName){		
		$obj = new Customer_Model_Customer();
		return $obj->getByCustomerName($CustomerName)->toArray();		
	}
	
	public function getByCond($cond,$type,$order,$count,$offset){
		$Obj = new Customer_Model_Customer();	
		return $Obj->getByCond($cond,$type,$order,$count,$offset);		
	}
	
	/*
	*判断是否是注册一个月内
	*/
	public static function getByGwemCustomerId($CustomerId){
		$obj = new Customer_Model_Customer();
		if($obj->getByGwemCustomerId($CustomerId)){
			return $obj->getByCustomerId($CustomerId)->toArray();
		}
	}

}